import { createI18n } from 'vue-i18n'
import zhCn from './lang/zh-cn'
import en from './lang/en'
import { localCache } from '@/utils/Cache'

const messages = {
  en: {
    ...en //把导入的英文词条合并
  },
  'zh-cn': {
    ...zhCn //把导入的中文词条合并
  }
}
const i18n = createI18n({
  locale: localCache.getCache('lang'),
  globalInjection: true,
  legacy: false,
  messages
})

export default i18n
